Repository navigation
Expand the thinnest chapters; fix figure style collisions; rework the selection guide - #3
Merged
Merged
Conversation
…nd worked problems
The selection matrix had muddled rows: Fibonacci heap as the competitive
programming priority queue, HDT as the CP connectivity choice, HyperLogLog
and Count-Min sharing one row though they answer different questions, a
problem name ("Range Min Query") listed as a structure, and no Manacher's
algorithm for palindromes. It is now organised by static vs dynamic data
and covers 20 needs.
Adds a five-question decision procedure with a flowchart, six worked
selection problems (autocomplete with a tested sparse-table top-k, a
leaderboard, crawler URL dedup with a Bloom filter, rate limiting,
room bookings, fleet latency percentiles), a list of common selection
mistakes, and two exercises.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ga8rBjM4kRZRhxKLznhSca
Adds a section on allocators as data structures: fragmentation, implicit free lists with boundary tags, explicit and segregated free lists and placement policies, size classes in dlmalloc/jemalloc/tcmalloc, the buddy system (with a diagram) as used by the Linux page allocator, slab allocation, and arenas. Runnable free-list, buddy and arena simulations are checked by an invariant-testing harness. Also explains the exact IEEE 754 arithmetic behind 0.1 + 0.2, fixes the float formula (the exponent is biased), and adds three exercises. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ga8rBjM4kRZRhxKLznhSca
…tory Adds AVL deletion (ported the chapter's C code to tested Python with a shared rebalance and delete), red-black deletion via the double black with its four cases, a section showing red-black trees are 2-3-4 trees (recolouring is a 4-node split, double black is underflow) with a diagram, left-leaning red-black trees with tested insert and delete and measured rotation counts, a historical context section, and three exercises. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ga8rBjM4kRZRhxKLznhSca
…rees Adds fat nodes and node copying (with a tested fat-node BST and the amortized argument for node copying) and how they compare with path copying; a configurable-branching persistent vector; persistent queues, showing why credit-based amortization fails under persistence and how Okasaki's banker's queue and the real-time queue fix it; finger trees and the monoid trick; and Git and PostgreSQL MVCC as persistence in practice. Corrects the history (confluent persistence dates from 1994) and the unit of the fat-node space bound. Three exercises. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ga8rBjM4kRZRhxKLznhSca
Adds Lamport, vector and hybrid logical clocks (vector clocks build on the chapter's VersionVector) with a worked three-process example and space-time diagram; sequence CRDTs for collaborative editing, showing why index-based edits diverge, the interleaving anomaly of fractional positions, and a tested RGA that converges under random delivery orders; and a short Merkle-tree anti-entropy section. Notes that the LWW-Register needs (time, replica id) tie-breaking. Three exercises. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ga8rBjM4kRZRhxKLznhSca
…other Inline SVG <style> rules apply to the whole page. Chapter 8's three figures each defined .n, .e, .t, .cap, .note and .k differently, and Chapter 16's two figures disagreed on .note, so whichever style came last won. Every figure's classes are now prefixed with its file name, and check_book.py fails if two figures on the same page share a class or an element id. Also moves the skip-list figure's end-of-search dot off the 47 label it was covering. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ga8rBjM4kRZRhxKLznhSca
…glev Adds a concrete longest-prefix-match section with a tested binary trie; multibit tries with controlled prefix expansion, a stride-choice table measured on a synthetic 50,000-route table, DIR-24-8 with a runnable model, and DPDK's rte_lpm layout (with a diagram); and ECMP with Maglev hashing, including a runnable table builder and measured balance and disruption. Corrects two wrong size claims about binary and radix tries. Three exercises. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ga8rBjM4kRZRhxKLznhSca
… CONTRIBUTING Adds 21 glossary terms (allocators, 2-3-4 and LLRB trees, persistence techniques, logical clocks, sequence CRDTs, ECMP/Maglev, longest-prefix match). Appendix A gains rows for persistent vectors, finger trees and LLRB trees, notes on AVL vs red-black rotation counts, and a new section on allocators, logical clocks and routing lookups. Volume V's overview becomes a study table like Volumes I-III. CONTRIBUTING documents the per-file CSS class prefix for figures. Counts updated (~220,000 words, 258 exercises). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ga8rBjM4kRZRhxKLznhSca
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New content (tested Python, new exercises, and a new diagram for every chapter except 17):
Fixes
<style>rules are page-global, so figures on the same page restyled one another (Ch 8, Ch 16).check_book.pynow fails on shared classes or ids, and CONTRIBUTING documents the rule.Reference pages
Verification
python3 scripts/check_book.pypasses.mdbook buildemits no warnings.Generated by Claude Code